﻿//
// Created: 2018/7/25
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.WeiXin;

namespace Model.WeiXin.Map
{
    internal  class WeiXinConfigMap:EntityTypeConfiguration<WeiXinConfig>    
    {
        public WeiXinConfigMap()
        {
             this.ToTable("WeiXin_Config");
             this.HasKey(i => new { i.ConfigID });
             this.Property(i => i.ConfigID).HasColumnName("ConfigID");                     
             this.Property(i => i.Name).HasColumnName("Name");                     
             this.Property(i => i.AppID).HasColumnName("AppID");                     
             this.Property(i => i.AppSecret).HasColumnName("AppSecret");                     
             this.Property(i => i.MchID).HasColumnName("MchID");                     
             this.Property(i => i.MchKey).HasColumnName("MchKey");                     
             this.Property(i => i.SSLCertPassword).HasColumnName("SSLCertPassword");                     
             this.Property(i => i.AliPayAccount).HasColumnName("AliPayAccount");                     
             this.Property(i => i.AliPayPassword).HasColumnName("AliPayPassword");                     
             this.Property(i => i.AliPayMobile).HasColumnName("AliPayMobile");                     
             this.Property(i => i.PayType).HasColumnName("PayType");                     
             this.Property(i => i.Remark).HasColumnName("Remark");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.IsDefault).HasColumnName("IsDefault");                     
             this.Property(i => i.QRCodeUrl).HasColumnName("QRCodeUrl");                     
             this.Property(i => i.Domain).HasColumnName("Domain");                     
             this.Property(i => i.subscribeWeclome).HasColumnName("subscribeWeclome");                     
        }   
    }
    
     public static class WeiXinConfigMapExtensions
    {
        public static void UserWeiXinConfigMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new WeiXinConfigMap());
        }
    }
}